define(['jquery','lib/knockout','model/viewModel/appViewModel','model/services/ajaxService','shell/app'],function($,ko,appViewModel,ajaxService,app){

    var customerDetailsController = function(){

        //event handling, making services for that module
        var onGetCustomerDetailsSuccess = function(data){
                appViewModel.customerDetails(data.UserList);
         },

         onGetCustomerDetailsError = function(error){
            alert('error');
         },
           init = function(){
                ajaxService.get('GetCustomerDetails',onGetCustomerDetailsSuccess,onGetCustomerDetailsError);
               $('body').on('click','#btnProducts',function(){
                    app.loadAndNavigate('products/productDetails','productDetails');
               });
               window.location.hash = '#customers';
            }();

        return {

        }

    }();


    return customerDetailsController;



});